package com.viptail.xiaogouzaijia.view.activyty;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.RadioGroup;

import com.viptail.xiaogouzaijia.R;
import com.viptail.xiaogouzaijia.utils.FragmentTabUtils;
import com.viptail.xiaogouzaijia.view.fragments.DiscoveryFragment;
import com.viptail.xiaogouzaijia.view.fragments.HomeFragment;
import com.viptail.xiaogouzaijia.view.fragments.MessageFragment;
import com.viptail.xiaogouzaijia.view.fragments.MyFragment;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {


    @BindView(R.id.btn_add)
    Button btnAdd;
    @BindView(R.id.rgs)
    RadioGroup rgs;

    private List<Fragment> fragments = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        fragments.add(HomeFragment.newInstance());
        fragments.add(DiscoveryFragment.newInstance());
        fragments.add(MessageFragment.newInstance());
        fragments.add(MyFragment.newInstance());

        FragmentTabUtils utils = new FragmentTabUtils(getSupportFragmentManager(), fragments, R.id.fragment_container, rgs);
    }

    @OnClick(R.id.btn_add)
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_add:
                break;
        }
    }
}
